<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		
		<script type="text/javascript">
			
			// 1. 变量名要符合规范
			var a = 123
			var _name = "zhangsan"
			
			// 2. 变量类型是由赋值决定
			var b = "123"
			console.log(b)
			console.log(typeof b)
			b = 123;
			console.log(b)
			console.log(typeof b)
			
			// var 也可以不写
			c = "hello"
			console.log(c)
			console.log(typeof c)
			
			// 没有声明，没有赋值 ,直接用 会报错
			// 02-变量.html:29 Uncaught ReferenceError: d is not defined
			console.log(d)
			
			
		</script>
	</body>
</html>
